import request from "@/axios";
import { Pagination } from "@/types/pagination";
import { User } from "@/types/user";
export const getUserList = (pages:Pagination.Pagination,  params?: User.SearchQuery) => {
    return request({
        method: "get",
        url: "/api/system/user",
        params:Object.assign(pages,params ? params : {})
    })
}
export const appendUser = (data: User.UserInfo) => {
    return request({
        method: "post",
        url: "/api/system/user",
        data,
    })
}
export const updateUser = <T>(data: User.UserInfo | T) => {
    return request({
        method: "put",
        url: "/api/system/user",
        data,
    })
}
export const removeUser = (id: string) => {
    return request({
        method: "delete",
        url: "/api/system/user/" + id,
    })
}